/*
 *  Medieval Melee
 *  Copyright (C) 2009 Ben Foote
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Uzebox is a reserved trade mark
*/

#ifndef __UNIT_TEST_H_
#define __UNIT_TEST_H_ 1U

#include <stdbool.h>

#define PSTR(s) (const char *)(s) 
#define PROGMEM
#define PC_WAVE         0
#define PC_NOTE_HOLD    1
#define PC_ENV_SPEED    2
#define PATCH_END       3
#define PC_PITCH        4
#define PC_NOTE_CUT     5

#ifndef NULL
	#define NULL            0U
#endif

#define BTN_START       0U
#define BTN_A           1U
#define BTN_B           2U
#define BTN_Y           3U
#define BTN_UP          4U
#define BTN_DOWN        5U
#define BTN_LEFT        6U
#define BTN_RIGHT       7U


struct  PatchStruct
{   
   		unsigned char type;
		const char *pcmData;
		const char *cmdStream;  
		unsigned int loopStart;
		unsigned int loopEnd;   		       
};
	
	
void InitMusicPlayer(const struct PatchStruct *patchPointersParam);
void SetTileTable(const char *data);
void SetFontTilesIndex(unsigned char index);
void SetSpritesTileTable(const char *data);
void ClearVram(void);
void Print(int x,int y,const char *string);
void WaitVsync(int count);
void srand(unsigned int random);
void MapSprite(unsigned char startSprite,const char *map);
void PrintByte(int x,int y, unsigned char val,bool zeropad);
unsigned int ReadJoypad(unsigned char joypadNo);
void MoveSprite(unsigned char startSprite,unsigned char x,unsigned char y,unsigned char width,unsigned char height);
void SetTile(char x,char y, unsigned int tileId);

#endif
